package com.fanbuchi.fukua.net;

import com.squareup.okhttp.Callback;
import com.squareup.okhttp.Request;
import com.squareup.okhttp.Response;

import java.io.IOException;

/**
 * Created by Administrator on 2015/7/10.
 */
public abstract class StringsCallBack implements Callback {
    @Override
    public void onFailure(Request request, IOException e) {

    }

    @Override
    public void onResponse(Response response) throws IOException {
        if (response.isSuccessful()){
            onResponseOk(response.body().string());
        }else{

        }
    }

    public abstract  void onResponseOk(String body);
}
